package com.java.demo.file;

import java.io.File;

public class OpenFile {

	private static MyFile myFile = new MyFile();

	public static void getFile() {
		String path = "~/log/";
		File file = new File(path);
		myFile.fileName = file.getName();
		myFile.fileSize = file.length();
		File[] files = file.listFiles();

		for (File f : files) {
			System.out.println(f.getName());
		}

	}

	public static void main(String[] args) {
		// OpenFile.getFile();
		// System.out.println(myFile.fileName + myFile.fileSize);
	}
}
